@extends('admin.pop_edit')
@section('body')
    <form lay-filter="editForm"
          action="{{admin_url($baseRoute.'update')}}"
          class="layui-form model-form">
        <input name="id" type="hidden"/>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">@lang('system.role.group_name'):</label>
            <div class="layui-input-block">
                @include('admin.system.widget.group_select',['widget_params'=>['showAll'=>false,'value'=>$entity->group_code]])
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">@lang('system.role.name'):</label>
            <div class="layui-input-block">
                <input type="text" name="name" placeholder="@lang('system.role.tips.name')" class="layui-input"
                       lay-verType="tips" lay-verify="required" required/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">@lang('system.role.intro'):</label>
            <div class="layui-input-block">
                <textarea name="desc" placeholder="@lang('system.role.tips.intro')" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="ajaxForm" lay-submit>@lang('common.save')</button>
            <button class="layui-btn layui-btn-primary" type="button"
                    ew-event="closeDialog">@lang('common.cancel')</button>
        </div>
    </form>
@stop
@push('script')
    <script type="text/javascript">
        layui.use('form', function () {
            layui.form.val('editForm', {!! json_encode($entity) !!});
        });
    </script>
@endpush